﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Globalization;

namespace SOWY
{
    public class Task
    {

        public string task{get;set;}
        public DateTime startDate { get; set; }
        public DateTime endDate { get; set; }
        public string type { get; set; }
        public string status{ get; set;}

        public Task()
        {
            task = "";
            startDate = DateTime.MinValue;
            endDate = DateTime.MinValue;
            type = "";
        }

        public Task(string t, DateTime start, DateTime end, string ty)
        {
            task = t;
            startDate = start;
            endDate = end;
            type = ty;
        }

        public Task(string t, DateTime start, DateTime end, string ty, string st)
        {
            task = t;
            startDate = start;
            endDate = end;
            type = ty;
            status = st;
        }

        public string print()
        {
            return task + "|" + startDate.Ticks + "|" + endDate.Ticks + "|" + type + "|" + status + Environment.NewLine;
            //return task + "|" + startDate.ToString("d", CultureInfo.CreateSpecificCulture("fr-FR")) + "|" + endDate.ToString("d", CultureInfo.CreateSpecificCulture("fr-FR")) +"\n";
        }
    }
}
